package cn.mrlong.base.ktnet.httpssupport

import java.security.cert.X509Certificate
import javax.net.ssl.X509TrustManager

/**
 * 作者：BINGO
 * 时间：2021/03/26 14:41
 * 让okhttp支持https  不检查证书问题
 */
class TrustAllCerts : X509TrustManager {
    override fun checkClientTrusted(chain: Array<out X509Certificate>?, authType: String?) {

    }

    override fun checkServerTrusted(chain: Array<out X509Certificate>?, authType: String?) {
    }

    override fun getAcceptedIssuers(): Array<X509Certificate?> {
        return arrayOfNulls(0)
    }
}